<div id="user_d_add" class="ajax_form">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">更新</h4>
    </div>
    <div class="modal-body">
        <div class="row">
            <form class="form-horizontal col-sm-12" method="post" action=" <%-req.url%> ">
                <div class="form-group">
                    <label for="usergroup" class="col-sm-2 control-label">用户组</label>
                    <div class="col-sm-8">
                        <select name="usergroup" id="usergroup" class="form-control" >
                            <option value="">用户组</option>
                            <%groups.forEach(function(one, key) {%>
                                <option value="<%-one.id%>" <% if(user.usergroup == one.id){ %> selected <%}%> > <%=__(one.varname)%></option>
                            <%})%>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="username" class="col-sm-2 control-label">用户名</label>
                    <div class="col-sm-8">
                        <input type="input" class="form-control" id="username" name="username" placeholder="用户名" value="<%-user.username%>">
                    </div>
                </div>
                <div class="form-group">
                    <label for="password" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-8">
                        <input type="input" class="form-control" id="password" name="password" placeholder="密码" value="">
                    </div>
                </div>
                <div class="form-group">
                    <label for="email" class="col-sm-2 control-label">邮箱</label>
                    <div class="col-sm-8">
                        <input type="input" class="form-control" id="email" name="email" placeholder="邮箱" value="<%-user.email%>">
                    </div>
                </div>
                <div class="form-group">
                    <label for="realname" class="col-sm-2 control-label">真实姓名</label>
                    <div class="col-sm-8">
                        <input type="input" class="form-control" id="realname" name="realname" placeholder="真实姓名" value="<%-user.realname%>">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">性别</label>
                    <div class="col-sm-8">
                        <label class="radio-inline">
                            <input type="radio" name="sex" value="1" <%if(user.sex === 1 || !user.sex){%> checked=""  <%}%> >
                            男
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="sex" value="0" <%if(user.sex === 0){%> checked=""  <%}%>>
                            女
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="sex" value="0" <%if(user.sex === 3){%> checked=""  <%}%>>
                            保密
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label for="tel" class="col-sm-2 control-label">联系电话</label>
                    <div class="col-sm-8">
                        <input type="tel" class="form-control" id="tel" name="tel" placeholder="联系电话" value="<%- user.tel%>">
                    </div>
                </div>
                <div class="form-group">
                    <label for="mobile" class="col-sm-2 control-label">手机</label>
                    <div class="col-sm-8">
                        <input type="mobile" class="form-control" id="mobile" name="mobile" placeholder="手机"  value="<%- user.mobile%>">
                    </div>
                </div>
                <div class="form-group">
                    <label for="fox" class="col-sm-2 control-label">传真</label>
                    <div class="col-sm-8">
                        <input type="fox" class="form-control" id="fox" name="fox" placeholder="传真" value="<%- user.fox%>">
                    </div>
                </div>
                <div class="form-group">
                    <label for="address" class="col-sm-2 control-label">联系地址</label>
                    <div class="col-sm-8">
                        <input type="address" class="form-control" id="address" name="address" placeholder="联系地址" value="<%- user.address%>">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">状态</label>
                    <div class="col-sm-8">
                        <label class="radio-inline">
                            <input type="radio" name="status" value="1" <%if(user.status === 1 || !user.status){%> checked=""  <%}%> >
                            启用
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="status" value="0" <%if(user.status === 0){%> checked=""  <%}%>>
                            禁用
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-8">
                        <button type="submit" class="btn btn-primary">提 交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="clearfix"></div>
</div>